<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义对象</title>
</head>
<body>
    <script>
        /*
        定义格式：
            var 对象名称 = {
                属性名称1:属性值1,
                属性名称2:属性值2,
                ...,
                函数名称:function (形参列表){},
                ...
            };
         */
        var person={
            name:"张三",
            age:25,
            sex:"男",
            print:function (){
                console.log(this.name+","+this.age+","+this.sex)
            }
        }

        person.print();



    </script>
</body>
</html>